/**
 * Created by lobin on 2017/7/24.
 */
import { Application } from 'egg';
import * as pageFindPlugin from 'mongoose-paginate';
export default (app: Application) => {
  const mongoose = app.mongoose;
  const schema = new mongoose.Schema({
    site: { type: String },
    phone: { type: String },
    name: { type: String, default: '' },
    count: { type: Number },
    tages: [{ type: String }],
    address_detail: String,
    lastUpdateTime: String,
    inblacklist: {
      type: Boolean,
      required: true,
      default: false,
    },
  });
  schema.plugin(pageFindPlugin, {});
  return mongoose.model('Phonetips', schema, 'phonetips');
};
